{# Stalker Pyramid a Web Base Production Asset Management System
 Copyright (C) 2009-2014 Erkan Ozgur Yilmaz
 
 This file is part of Stalker Pyramid.
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation;
 version 2.1 of the License.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#}
{% block me_menu %}
    <div class='dijitDialogPaneContentArea'>
        <table style='width: 100%'>
            <tr>
                <td rowspan='2'>
                    <div id='avatar'>
                        {% if not logged_in_user.thumbnail %}
                            <img src='{{ request.static_url("stalker_pyramid:static/stalker/images/Placeholder_0.png") }}'
                                 alt=''
                                 style='width:90px; height: auto;'>
                        {% else %}
                            <img src='{{ logged_in_user.thumbnail.full_path }}'
                                 alt=''
                                 style='width:90px; height: auto;'>
                        {% endif %}
                    </div>
                </td>
                <td>
                    <strong>{{ logged_in_user.name }}</strong><br>
                    {{ logged_in_user.email }}
                </td>
            </tr>
        </table>
    </div>
    <div class='dijitDialogPaneActionBar'>
        <button id='settings_button'
                dojoType='dijit.form.Button'
                type='button'
                onClick="
                        require([
                        'stalker/js/dialogs',
                        'stalker/js/dialogCreator',

                        'dojo/domReady!'
                        ], function (dialogs, dialogCreator) {

                        var myDialog = dialogCreator({
                        dialog_id: 'update_user_dialog',
                        data_id: '{{ logged_in_user.id }}',
                        content_creator: dialogs.update_user_dialog
                        });
                        myDialog.show();

                        });
                        "
                >Settings
        </button>
        <button id='logout_button'
                dojoType='dijit.form.Button'
                type='button'
                onclick='window.location = "/logout"'
                >Logout
        </button>
    </div>
{% endblock %}

